package com.example.controller;

import com.example.domain.Result;
import com.example.service.CollegeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/college")
public class CollegeController extends MyController {

    @Autowired
    private CollegeService collegeService;

    @GetMapping("/options")
    public Result option() {
        List<Map<String, Long>> data = this.collegeService.selectOptions();
        return success(data);
    }
}
